
<form action="<?=$_SERVER['PHP_SELF']?>?p=edit_goods" method="post" enctype="multipart/form-data">
	<div class="form-group">
		<label for="goods_name_edit">Название товара: </label>
		<input type="text" name="goods_name_edit" class="form-control" value="<?=$edit_data[0]['name']?>">
	</div>

	<div class="form-group">
		<label for="goods_desc_edit">Онисание товара: </label>
		<textarea name="goods_desc_edit" id="goods_desc" cols="30" rows="10" class="form-control"><?=$edit_data[0]['description']?></textarea>
	</div>

	<div class="form-group">
		<label for="goods_price_edit">Цена: </label>
		<input type="text" name="goods_price_edit" id="goods_price" class="form-control" value="<?=$edit_data[0]['price']?>">
	</div>

	<div class="form-group">
		<label for="goods_img">Картинка товара: </label>
		<input type="file" name="goods_img_edit">
	</div>

	<div class="form-group">
		<label for="goods_cat_edit">Категория товара: </label>
		<select name="goods_cat_edit" id="" class="form-control">
			<?php
				$cat = get_cat();
				foreach ($cat as $key => $value) {
					$sel = '';
					if($edit_data[0]['cat_name'] == $value[1]) $sel = "selected";

					?>
					<option value="<?=$value[0]?>" <?=$sel?>><?=$value[1]?></option>
					<?php
				}
			?>
		</select>
	</div>

	<input type="hidden" name="id_goods_edit" value="<?=$edit_data[0]['id_goods']?>">

	<div class="form-group">
		<input type="submit" name="goods_edit" class="btn btn-lg btn-primary" value="Редактировать товар">
	</div>
</form>